<template>
  <!--  高频次疾病图表-->
  <my-charts id="high-frequency-disease" :options="chartOption" />
</template>

<script>
import MyCharts from '@/components/MyCharts/index'
import { toolboxY } from '@/components/MyCharts/toolbox'

export default {
  name: 'HighFrequencyDisease',
  mixin: [],
  components: {
    'my-charts': MyCharts
  },
  props: {
    axisData: {
      type: Array,
      default: () => []
    },
    seriesData: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {}
  },
  computed: {
    chartOption: function() {
      return {
        title: {
          show: true,
          text: '高频次疾病排名TOP10',
          subtextStyle: {
            align: 'center'
          }
        },
        color: ['#3398DB'],
        toolbox: toolboxY('疾病'),
        tooltip: {
          trigger: 'axis',
          axisPointer: { type: 'shadow' }
        },
        xAxis: [{ type: 'value' }],
        yAxis: [
          {
            type: 'category',
            data: this.axisData,
            axisTick: { alignWithLabel: true }
          }
        ],
        series: [
          { name: '高频次疾病排名',
            type: 'bar',
            barWidth: '50%',
            data: this.seriesData
          }
        ]
      }
    }
  },
  watch: {},
  created() {
  },
  mounted() {
  },
  methods: {}
}
</script>

<style scoped lang="scss"></style>
